/** 外呼前缀与坐席对应关系 */
import request from '@/utils/request'

/** 新增
 * @params {object} data
*/
export function postPrefixDeptRelation(data) {
  return request({
    method: 'POST',
    url: '/call-center/api/v1/prefixDeptRelation',
    data
  })
}
/** 修改
 * @params {object} data
 */
export function putPrefixDeptRelation(data) {
  return request({
    method: 'PUT',
    url: '/call-center/api/v1/prefixDeptRelation',
    data
  })
}
/** 查询所有
 */
export function getPrefixDeptRelation() {
  return request({
    method: 'GET',
    url: '/call-center/api/v1/prefixDeptRelation/'
  })
}
/** 根据id查询
 * @params {string} id
 */
export function getByIdPrefixDeptRelation(id) {
  return request({
    method: 'GET',
    url: `/call-center/api/v1/prefixDeptRelation/${id}`
  })
}
/** 删除
 * @params {string} id
 */
export function deletePrefixDeptRelation(id) {
  return request({
    method: 'DELETE',
    url: `/call-center/api/v1/prefixDeptRelation/${id}`
  })
}
/** 批量删除
 */
export function deleteBatch(ids) {
  return request({
    method: 'DELETE',
    url: `/call-center/api/v1/prefixDeptRelation/deleteBatch`,
    data: {
      ids
    }
  })
}
